<?php

class Cat_Tags_Php_Classname extends Cat_Processor_Monkey_TagBase
{
	function getOutput()
	{	
		return $this->getClassName( $this->getParam('output.filename') );
	}
	
	private function getClassName( $file )
	{
	    return Cat_Strings :: classize( $this->toRelativeNoExt( $file ) );
	}
	
	private function toRelativeNoExt( $file )
	{
		return mb_substr( $this->toRelative( $file ), 0, -1 * mb_strlen( $this->getParam( 'output.extension' ) ) );
	}
	
	private function toRelative( $file )
	{
		return trim( trim( mb_substr( realpath( $file ), mb_strlen( realpath( $this->getParam( 'output.path' ) ) ) ), '/' ), '\\' );		
	}
}

?>
